package org.sixtynine.stock.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "CUSTOMER_UPGRADE")
public class CustomerUpgrade extends BaseEntity {

	private int id;
	private Date upgradeDate;
	private int ipgStatus;
	private String orderId;
	private String upgradeDec;
	private String currencyCode;
	private Date nextPayment;

	private User user;
	private PackageData packg;

	@Id
	@Column(name = "ID", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column(name = "UPGRADE_DATE")
	public Date getUpgradeDate() {
		return upgradeDate;
	}

	public void setUpgradeDate(Date upgradeDate) {
		this.upgradeDate = upgradeDate;
	}

	@Column(name = "IPG_STATUS")
	public int getIpgStatus() {
		return ipgStatus;
	}

	public void setIpgStatus(int ipgStatus) {
		this.ipgStatus = ipgStatus;
	}

	@Column(name = "ORDER_ID")
	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	@Column(name = "UPGRADE_DEC")
	public String getUpgradeDec() {
		return upgradeDec;
	}

	public void setUpgradeDec(String upgradeDec) {
		this.upgradeDec = upgradeDec;
	}

	@Column(name = "CURRENCY_CODE")
	public String getCurrencyCode() {
		return currencyCode;
	}

	public void setCurrencyCode(String currencyCode) {
		this.currencyCode = currencyCode;
	}

	@Column(name = "NEXT_PAYMENT")
	public Date getNextPayment() {
		return nextPayment;
	}

	public void setNextPayment(Date nextPayment) {
		this.nextPayment = nextPayment;
	}

	@ManyToOne
	@JoinColumn(name = "CUSTOMER_ID")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@ManyToOne
	@JoinColumn(name = "PACKAGE_ID")
	public PackageData getPackg() {
		return packg;
	}

	public void setPackg(PackageData packg) {
		this.packg = packg;
	}

}
